import 'package:ball_lion/entity/ai/ai_item_entity.dart';

class AiDateEntity {
  List<DayList>? dayList;
  List<AiItemEntity>? matchList;
  List<AiItemEntity>? notHitList;
  String? leftText;
  String? rightText;
  String? info;
  String? logo;
  String? name;

  AiDateEntity(
      {this.dayList,
      this.leftText,
      this.matchList,
      this.rightText,
      this.info,
      this.logo,
      this.name});

  AiDateEntity.fromJson(Map<String, dynamic> json) {
    if (json['dayList'] != null) {
      dayList = <DayList>[];
      json['dayList'].forEach((v) {
        dayList!.add(new DayList.fromJson(v));
      });
    }
    leftText = json['leftText'];
    if (json['notHitList'] != null) {
      notHitList = <AiItemEntity>[];
      json['notHitList'].forEach((v) {
        notHitList!.add(new AiItemEntity.fromJson(v));
      });
    }
    if (json['matchList'] != null) {
      matchList = <AiItemEntity>[];
      json['matchList'].forEach((v) {
        matchList!.add(new AiItemEntity.fromJson(v));
      });
    }
    rightText = json['rightText'];
    info = json['info'];
    logo = json['logo'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.dayList != null) {
      data['dayList'] = this.dayList!.map((v) => v.toJson()).toList();
    }
    data['leftText'] = this.leftText;
    if (this.notHitList != null) {
      data['notHitList'] = this.notHitList!.map((v) => v.toJson()).toList();
    }
    if (this.matchList != null) {
      data['matchList'] = this.matchList!.map((v) => v.toJson()).toList();
    }
    data['rightText'] = this.rightText;
    data['info'] = this.info;
    data['logo'] = this.logo;
    data['name'] = this.name;
    return data;
  }
}

class DayList {
  bool? allHit;
  String? day;
  String? day1;
  String? day2;
  bool? selected;

  DayList({this.allHit, this.day, this.day1, this.day2, this.selected});

  DayList.fromJson(Map<String, dynamic> json) {
    allHit = json['allHit'];
    day = json['day'];
    day1 = json['day1'];
    day2 = json['day2'];
    selected = json['selected'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['allHit'] = this.allHit;
    data['day'] = this.day;
    data['day1'] = this.day1;
    data['day2'] = this.day2;
    data['selected'] = this.selected;
    return data;
  }
}
